package com.ruoyi.course.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.course.domain.SHomeworkOption;
import com.ruoyi.course.vo.SHomeworkOptionVo;
import com.ruoyi.course.mapper.SHomeworkOptionMapper;
import com.ruoyi.course.service.ISHomeworkOptionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 学生作业选项Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class SHomeworkOptionServiceImpl extends ServiceImpl<SHomeworkOptionMapper, SHomeworkOption> implements ISHomeworkOptionService {

    @Override
    public TableDataInfo<SHomeworkOptionVo> queryList(SHomeworkOptionVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<SHomeworkOptionVo> queryAll(SHomeworkOptionVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public SHomeworkOptionVo queryById(Long id) {
        return this.baseMapper.queryById(id);
    }
}
